package com.gedeshidai.shumadevelop.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gedeshidai.shumadevelop.common.BaseResponse;
import com.gedeshidai.shumadevelop.model.dto.product.ProductProxyRequest;
import com.gedeshidai.shumadevelop.model.dto.product.ProductSelectRequest;
import com.gedeshidai.shumadevelop.model.entity.Product;
import com.gedeshidai.shumadevelop.model.vo.ProductVO;
import com.gedeshidai.shumadevelop.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author Romdon
* @description 针对表【products(商品基本信息表)】的数据库操作Service
* @createDate 2024-06-17 08:28:14
*/
public interface ProductService extends IService<Product> {
    /**
     * 获取查询条件
     * @param productSelectRequest
     * @param request
     * @return
     */
    QueryWrapper<Product> getQueryWrapper(Product product, HttpServletRequest request);
    /**
     * 根据商品id查询代理人
     * @param id
     * @return
     */
    BaseResponse<Page<UserVO>> getProxysById(ProductProxyRequest productProxyRequest);

    /**
     * 从基本商品表中删除的代理人
     * @param proxys
     * @return
     */
    void deleteProxys(List<String> proxys,Long id);
    /**
     * 添加代理人
     * @param userAccount
     * @param id
     * @return
     */
    void addProxy(String userAccount,Long id);


    //查询商品信息
    public BaseResponse<Page<ProductVO>> SelectShoppingsDetailsList(ProductSelectRequest productSelectRequest, HttpServletRequest request);

}
